    <div id="breadcrumbs"><?php echo $this->Html->link('Home', array('controller' => 'contents', 'action' => 'view', 'home')); ?> > List Menus 
</div>
<div class="menus index">
    <h2><?php echo __('Navigation'); ?></h2>
    <?php 
    //to display navigation with regards to roles
    echo $this->Html->link('Public',array('action'=>'index', 0))." / ";
    echo $this->Html->link('Staff',array('action'=>'index', 1))." / ";
    echo $this->Html->link('Super Admin',array('action'=>'index', 2));
    ?>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('name'); ?></th>            
            <th><?php echo $this->Paginator->sort('hidden'); ?></th>
            <th><?php echo $this->Paginator->sort('role'); ?></th>
            <th>Up</th>
            <th>Down</th>
            <th>Edit</th>
            <th>Delete</th>
        </tr>
        <?php foreach ($menus as $menu): ?>
            <tr>
                <td><?php
                    if ($menu['Menu']['parent_id'] != null) {
                        echo '&nbsp&nbsp-';
                    }
                    echo h($menu['Menu']['name']);
                    ?>&nbsp;</td>
                <td><?php
                //display hidden yes or no
                if ($menu['Menu']['hidden'] == 0) {
                    echo "Yes";
                } else {
                    echo "No";
                }
                    ?>&nbsp;</td>
                <td><?php
                //display what roles the menu is for
                if ($menu['Menu']['role'] == 0) {
                    echo "Public";
                } else if ($menu['Menu']['role'] == 1) {
                    echo "Staff";
                } else {
                    echo "Super Admin";
                }
                    ?>&nbsp;</td>
                <td><?php echo $this->Html->image('iconup.jpg', array('alt' => 'Move Up', 'url' => array('action' => 'moveup', $menu['Menu']['id']), 'width' => '20px', 'height' => '20px')); ?></td>
                <td><?php echo $this->Html->image('icondown.jpg', array('alt' => 'Move Down', 'url' => array('action' => 'movedown', $menu['Menu']['id']), 'width' => '20px', 'height' => '20px')); ?></td>              
                <td><?php echo $this->Html->image('edit.png', array('alt' => 'Edit', 'url' => array('action' => 'edit', $menu['Menu']['id']))); ?></td>
                <td><?php echo $this->Form->postLink($this->Html->image('delete.png', array('alt' => __('Delete'))), array('action' => 'delete', $menu['Menu']['id']), array('escape' => false, 'confirm'=>__('Are you sure you want to delete '. $menu['Menu']['name']. '?'))); ?></td>			
            </tr>
        <?php endforeach; ?>
    </table>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('New Navigation'), array('action' => 'add')); ?></li>
    </ul>
</div>
